public class Date {
    public int year;
    public int month;
    public int day;

    public Date(){
        this.year =2025;
        this.month = 5;
        this.day = 14;
    }
    public Date(int year, int month, int day){
        this.year =year;
        this.month = month;
        this.day = day;
    }

//    名字相同，参数列表不同，就构成了重载
    public void printDate(){
        System.out.println(year + "-"+ month +"-" + day);
    }
    public static void main(String[] args) {
        Date d = new Date(2022,4,3);
        d.printDate();
    }
}
